const words = ["TMD", "密码", "打人了", "傻逼", "SB"];
function replaceWord(str: string) {
  words.forEach((item) => {
    const regexp = new RegExp(item, "gi");
    str = str.replace(regexp, "*".repeat(item.length));
  });
  return str;
}
export default replaceWord;